package com.spring.learn;

/**
 * 对用户服务功能的具体实现：注册用户，用户登录
 */
public class UserServiceImpl implements UserService {
    //private UserDAO userDAO = new UserDAOImpl();
    private UserDAO userDAO =  (UserDAO) BeanFactory.getBean("userDAO");

    @Override
    public void register(User user) {
        userDAO.save(user);
    }

    @Override
    public void login(String name, String password) {
        userDAO.queryUserByNameAndPassword(name, password);
    }
}
